package com.ny.kind;

public class student {
    private final String name;
    private final int age;
    private final String sex;
    private final String num;
    private final String clas;

    public student(String name, int age, String sex, String num, String clas) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.num = num;
        this.clas = clas;
    }
    public void study() {
        System.out.println(name + "在学习");
    }

    public void displayInfo() {
        System.out.println("姓名: " + name);
        System.out.println("年龄: " + age);
        System.out.println("性别: " + sex);
        System.out.println("学号: " + num);
        System.out.println("班级: " + clas);
    }

    public static void main(String[] args) {
        student student = new student("唐莉", 19, "女", "20231079141", "23物联网2班");
        student.study();
        System.out.println("\n学生信息:");
        student.displayInfo();
    }
}